package cn.good.yan.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


/**
 * 测试 nacos 是否连接正常
 *
 * @author shengren.yan
 * @create 2022-04-06
 */
@RestController
public class PayAlibabaController {

    @Value("${server.port}")
    private String serverPort;

    // 请求地址：http://localhost:9001/nacos/2  正常
    @GetMapping(value = "/nacos/{id}")
    public String getPayInfo(@PathVariable("id") Integer id) {
        return "nacos 访问接口: " + serverPort + "\t id" + id;
    }


}
